import type {RouteRecordRaw} from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/parking_menu',
  component: Layout,
  redirect: '/parking_menu/list',
  name: 'parkingMenu',
  meta: {
    title: '车位管理',
    icon: 'i-heroicons-solid:menu-alt-3',
  },
  children: [
    {
      path: 'list',
      name: 'parkingList',
      component: () => import('@/views/park/list/index.vue'),
      meta: {
        title: '车位一览',
      },
    },
    {
      path: 'record',
      name: 'parkingRecord',
      component: () => import('@/views/park/record/index.vue'),
      meta: {
        title: '停车记录',
      }
    },
  ],
}

export default routes
